<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import { m } from "@/store/yg/common/local";
export default {
  name: "app",
  mounted() {
    // if (this.$route.path !== "/") {
    //   const titleMap = JSON.parse(localStorage.getItem("titleMap"));
    //   const url = "/" + this.$route.params.uri.replace(/__/g, "/");
    //   document.title = m(titleMap[url]);
    // }

    this.bodyScale();
    window.onload = window.onresize = () => {
      this.bodyScale();
    };
  },
  methods: {
    m(k) {
      return m(k);
    },
    bodyScale() {
      if (this.getClientInfo() !== "PC") return;
      var devicewidth = document.documentElement.clientWidth;
      if (devicewidth < 1440) {
        var scale = devicewidth / 1440; // 分母——设计稿的尺寸
        document.body.style.zoom = scale;
      } else {
        document.body.style.zoom = 1;
      }
    },
    getClientInfo() {
      var userAgentInfo = navigator.userAgent;
      var Agents = new Array(
        "Android",
        "iPhone",
        "SymbianOS",
        "Windows Phone",
        "iPad",
        "iPod"
      );
      var agentinfo = null;
      for (var i = 0; i < Agents.length; i++) {
        if (userAgentInfo.indexOf(Agents[i]) > 0) {
          agentinfo = userAgentInfo;
          break;
        }
      }
      if (agentinfo) {
        return agentinfo;
      } else {
        return "PC";
      }
    }
  }
};
</script>

<style>
#app {
  color: #1f2f3d;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}
* {
  padding: 0;
  margin: 0;
}
body,
html {
  height: 100%;
  overflow: hidden;
  margin: 0;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
    Microsoft YaHei, SimSun, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a {
  text-decoration: unset;
}
.el-table thead {
  color: #2c3e50;
  font-weight: 500;
}
.el-submenu__title i,
.el-menu-item i {
  color: #444;
}
.el-badge__content {
  border: 0px solid #fff !important;
}
.el-main {
  color: #1f2f3d;
  text-align: center;
  padding: 0px;
}
.el-tabs__nav-wrap {
  padding-left: 15px;
}
.el-menu-item-group__title {
  display: none;
}
.table-expand-item .el-form-item__label {
  width: 70px;
  color: #99a9bf;
}
.badge {
  border-radius: 10px;
  color: #fff;
  display: inline-block;
  font-size: 12px;
  height: 18px;
  line-height: 18px;
  padding: 0 6px;
  text-align: center;
  float: right;
}
.explain {
  border-bottom: 1px dashed #2673db;
}
.info {
  color: #5bc0de;
}
.primary,
.blue {
  color: #409eff;
}
.danger,
.red {
  color: #d9534f;
}
.success,
.green {
  color: #5cb85c;
}
.warning,
.yellow {
  color: #f0ad4e;
}
.warning-row {
  background: oldlace !important;
}
.danger-row {
  /* background: orange !important; */
  background: rgba(249, 236, 195, 1) !important;
}
.success-row {
  background: #f0f9eb !important;
}
.b-primary,
.b-blue {
  background-color: #409eff;
}
.b-danger,
.b-red {
  background-color: #d9534f;
}
.b-info {
  background-color: #5bc0de;
}
.b-success,
.b-green {
  background-color: #5cb85c;
}
.b-warning,
.b-yellow {
  background-color: #f0ad4e;
}
.pointer {
  cursor: pointer;
}
.huge {
  font-size: 30px;
}
.bigger {
  font-size: 25px;
}
.big {
  font-size: 20px;
}
.large {
  font-size: 17px;
}
.small {
  font-size: 15px;
}
.content {
  padding: 40px 20px;
}
.text-center {
  text-align: center;
}
.el-select .el-tag,
.el-cascader__tags .el-tag {
  background-color: #409eff;
  color: #fff;
}
.el-select .el-tag__close.el-icon-close,
.el-cascader__tags .el-tag .el-icon-close {
  background-color: #fff;
  color: #000;
}
.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
  background-color: #fff;
}
.inline .el-form-item__content {
  line-height: inherit;
  /* font-size: 12px; */
}

.el-table .cell {
  /* font-size: 12px; */
}

.message .mint-cell,
.message .mint-cell .mint-cell-wrapper {
  background-image: none !important;
}
.expanded td {
  border-bottom: 0px solid #ebeef5;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@-webkit-keyframes blink {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@-moz-keyframes blink {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@-ms-keyframes blink {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@-o-keyframes blink {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.blink {
  animation: blink 1s linear infinite;
  -webkit-animation: blink 1s linear infinite;
  -moz-animation: blink 1s linear infinite;
  -ms-animation: blink 1s linear infinite;
  -o-animation: blink 1s linear infinite;
}
.el-tabs--card > .el-tabs__header .el-tabs__nav {
  border: none;
}
.el-tabs--card > .el-tabs__header .el-tabs__item {
  border-left: none;
}
.el-tabs__header {
  margin: 0px;
}
.el-tabs--card > .el-tabs__header .el-tabs__item.is-active {
  border-bottom: 1px solid #409eff;
}
.el-table__expanded-cell[class*="cell"] {
  padding: 10px;
}

.el-notification.right {
  width: auto;
}
.el-notification a {
  color: #2673db;
}
</style>
